package cn.yuanqiao.activiti.service;

import cn.yuanqiao.activiti.domain.ActArchiveData;
import cn.yuanqiao.common.enums.BusinessBehavior;

import java.util.List;
import java.util.Map;

/**
 * 流程档案数据绑定Service接口
 * 
 * @author lyk
 * @date 2023-07-11
 */
public interface IActArchiveDataService {
    /**
     * 查询流程档案数据绑定
     *
     * @param deployId 流程档案数据绑定主键
     * @return 流程档案数据绑定
     */
    public ActArchiveData selectActArchiveDataByDeployId(String deployId);

    public ActArchiveData selectActArchiveDataByArchiveId(String archiveId);


    /**
     * 查询流程档案数据绑定列表
     *
     * @param actArchiveData 流程档案数据绑定
     * @return 流程档案数据绑定集合
     */
    public List<ActArchiveData> selectActArchiveDataList(ActArchiveData actArchiveData);

    /**
     * 新增流程档案数据绑定
     *
     * @param actArchiveData 流程档案数据绑定
     * @return 结果
     */
    public int insertActArchiveData(ActArchiveData actArchiveData);

    public int batchInsertActArchiveData(List<ActArchiveData> actArchiveData);

    /**
     * 修改流程档案数据绑定
     *
     * @param actArchiveData 流程档案数据绑定
     * @return 结果
     */
    public int updateActArchiveData(ActArchiveData actArchiveData);

    /**
     * 批量删除流程档案数据绑定
     *
     * @param deployIds 需要删除的流程档案数据绑定主键集合
     * @return 结果
     */
    public int deleteActArchiveDataByDeployIds(String[] deployIds);

    /**
     * 删除流程档案数据绑定信息
     *
     * @param deployId 流程档案数据绑定主键
     * @return 结果
     */
    public int deleteActArchiveDataByDeployId(String deployId);

    int updateActArchiveDataEndByDeployId(String processInstanceId);

    void batchUpdateArchiveState(List<Map<String, Object>> archiveData, String state);

    void addSeal(List<Map<String, Object>> archiveData);

    void batchUpdateBorrowState(Map<String, Object> borrowData, String state, List<String> archiveNotAgree);

    String getBusinessIdFromWorkFlowArchiveSaveByInstanceId(String instanceId);

    void batchUpdateArchiveColumn(List<Map<String, Object>> archiveData, String column, String state);

    void addBehavior(List<Map<String, Object>> sqlList, String tenantCode, String idField, String daTypeField, BusinessBehavior behavior);

    void batchUpdateBorrowDownload(Map<String, Object> borrowData);

    void batchUpdateArchiveBorrowState(Map<String, Object> borrowData,String tenantCode, String state, List<Map<String, Object>> archiveIdsAgree);
}
